Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Server-side participant pinning #881

Merged
merged 13 commits into from
Aug 7, 2023
Merged

feat!: Server-side participant pinning #881

merged 13 commits into from
Aug 7, 2023

Conversation

oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Jul 31, 2023

Overview

Adds support for Server-Side participant pinning.

Reference: https://github.com/GetStream/chat/pull/5239, GetStream/protocol#174
Specs: https://www.notion.so/stream-wiki/Video-Pinning-2b348a962da742389f734b7fd9b1cf46

Breaking changes

This PR brings a small breaking change in the participant pinning API. Previously, we used to have call.setParticipantPinnedAt API which is now replaced with call.pin(sessionId) and call.unpin(sessionId) APIs.

Additionally, the participant.pinnedAt property has been replaced with a new pin structure of this shape:

const participant = {
  ...,
  pin: {
    isLocal: boolean, // set to `true` when this participant is server-side pinned
    pinnedAt: number, // a timestamp, shows when "pinning" happened
  }
}

Copy link
Member

@khushal87 khushal87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving changes for RN and pin and un-pin changes.

Pin for all needs to be tested.

Thanks, @oliverlaz for adding the changes to RN SDK. 🚀

@oliverlaz oliverlaz changed the title feat: Server-side participant pinning feat!: Server-side participant pinning Aug 7, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

61.2% 61.2% Coverage
0.0% 0.0% Duplication

@oliverlaz oliverlaz merged commit 72829f1 into main Aug 7, 2023
19 of 22 checks passed
@oliverlaz oliverlaz deleted the server-side-pinning branch August 7, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants